home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / bananamonkey.swf / scripts / frame_15 / PlaceObject2_120_231 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-19  |  1.6 KB  |  74 lines

  1. onClipEvent(enterFrame){
  2.    if(_X <= 0)
  3.    {
  4.       _X = 10;
  5.    }
  6.    else if(_X >= 590)
  7.    {
  8.       _X = 580;
  9.    }
  10.    if(_root.amitavaplay == true)
  11.    {
  12.       if(Key.isDown(38) && waking == 1 && _Y > 50)
  13.       {
  14.          if(cach == 1)
  15.          {
  16.             this._rotation = 0;
  17.             this.gotoAndStop(2);
  18.             mov = 3;
  19.          }
  20.       }
  21.       else if(Key.isDown(40) && waking == 1 && _Y < 500)
  22.       {
  23.          if(cach == 1)
  24.          {
  25.             this._rotation = 180;
  26.             this.gotoAndStop(2);
  27.             mov = -3;
  28.          }
  29.       }
  30.       else if(Key.isDown(39) && waking == 1 && _X < 550)
  31.       {
  32.          if(cach == 1)
  33.          {
  34.             this._rotation = 90;
  35.             this.gotoAndStop(3);
  36.             movx = -3;
  37.          }
  38.       }
  39.       else if(Key.isDown(37) && waking == 1 && _X > 50)
  40.       {
  41.          if(cach == 1)
  42.          {
  43.             this._rotation = -90;
  44.             this.gotoAndStop(3);
  45.             movx = 3;
  46.          }
  47.       }
  48.       if(this.hitTest(_root.banana))
  49.       {
  50.          if(cach == 1)
  51.          {
  52.             if(food <= 4)
  53.             {
  54.                food += 1;
  55.                _root.banana._visible = false;
  56.                this.gotoAndStop(4);
  57.                cach = 0;
  58.             }
  59.             if(food == 4)
  60.             {
  61.                if(lev == 1)
  62.                {
  63.                   if(_root.amitavalife > 0)
  64.                   {
  65.                      _root.levl.gotoAndPlay(2);
  66.                      lev = 0;
  67.                   }
  68.                }
  69.             }
  70.          }
  71.       }
  72.    }
  73. }
  74.